﻿'Description:反射创建类
'Copyright (c) : 通力凯顿（北京）系统集成有限公司
'Writer:Wangjh 
'create Date:2019-01-09
'Rewriter:
'Rewrite Date:
Imports System.Reflection
Imports BusinessRule.DBEntity
Public Class ReflectClassOperation

    ''' <summary>
    ''' 根据命名空间、对象名反射创建对象
    ''' </summary>
    ''' <param name="strNameSpace"></param>
    ''' <param name="objectName"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared Function ReflectClassByNameSpace(ByVal strNameSpace As String, ByVal objectName As String) As Object
        Dim CacheKey As String = strNameSpace + "." + objectName
        Dim objType As Object = Assembly.Load(strNameSpace).CreateInstance(CacheKey)
        Return objType
    End Function

End Class
